﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace MotionPlanning.MotionPlanningPrimitives
{
    public class RoboticSystemPlanningNodeData
    {
        static public Stopwatch systemTiming;
        protected long birthTime;
        protected double[] q;
        protected double[] q_alias;
        protected double utility_c;

        public double[] get_q_alias()
        {
            return q_alias;
        }

        public void set_q_alias(double[] q_alias)
        {
            this.q_alias = q_alias;
        }

        public double[] get_q()
        {
            return q;
        }
        public void set_q(double[] q)
        {
            this.q = q;
        }
        public double get_utility_c()
        {
            return utility_c;
        }
        public void set_utility_c(double cost)
        {
            utility_c = cost;
        }
        public long get_birth_time()
        {
            return birthTime;
        }
        public RoboticSystemPlanningNodeData()
        {
            q = null;
            utility_c = 0;

            if (systemTiming == null)
                systemTiming = new Stopwatch();
            if (systemTiming.IsRunning == false)
                systemTiming.Start();
            birthTime = systemTiming.ElapsedTicks;
        }
        public RoboticSystemPlanningNodeData(double[] q, double cost)
        {
            this.q = q;
            this.utility_c = cost;

            if (systemTiming == null)
                systemTiming = new Stopwatch();
            if (systemTiming.IsRunning == false)
                systemTiming.Start();
            birthTime = systemTiming.ElapsedTicks;
        }
        public override string ToString()
        {
            throw new NotImplementedException("RoboticSystemPlanningNodeData.ToString() not implemented.");
        }
    }
}
